﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.DomainServices.EntityFramework;
using Didsoft.SalesLive.AccesoDatos;
using System.Data.Entity.Infrastructure;
using Didsoft.SalesLive.Entidades;
using System.Data;

namespace Didsoft.SalesLive.Negocios
{
    public class DomainServiceBase<TEntity> : DbDomainService<MyDBContext>  where TEntity : System.Data.Entity.Infrastructure.DbEntityEntry
    {

        //DbDomainServiceTest service;
        public DomainServiceBase()
        {
            
        }

        private void Insertar(TEntity entidad)  
        {           

            //DbEntityEntry<TEntity> entityEntry = this.DbContext.Entry(entidad);
            //    if ((entityEntry.State != EntityState.Detached))
            //    {
            //        entityEntry.State = EntityState.Added;
            //    }
            //    else
            //    {
            //        this.DbContext.  En TEntity.Add(entidad);
            //        this.DbContext.SaveChanges();
            //    }
           
        }
    }



}
